<template>
  <v-textarea
    v-model="tempText"
    outlined
    label="文本内容："
    placeholder="请输入文本内容"
    auto-grow
    :rows="2"
  />
</template>

<script>
export default {
  name: 'AttrH5Text',
  props: {
    text: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      tempText: ''
    }
  },
  watch: {
    text() {
      this.tempText = this.text
    },
    tempText() {
      this.$emit('update:text', this.tempText)
    }
  },
  mounted() {
    this.tempText = this.text
  }
}
</script>
